package com.jinduplan.planmanager.ui.activity.msg

import android.content.Intent
import android.util.Log
import android.view.View
import androidx.recyclerview.widget.LinearLayoutManager
import com.cxz.kotlin.baselibs.adapter.CustomRecyclerAdapter
import com.cxz.kotlin.baselibs.adapter.ViewHolder
import com.cxz.kotlin.baselibs.base.BaseMvpActivity
import com.fphoenixcorneae.util.toast.ToastUtil
import com.jinduplan.planmanager.R
import com.jinduplan.planmanager.bean.DataProjectBean
import com.jinduplan.planmanager.bean.MessageBean
import com.jinduplan.planmanager.mvp.contract.MessageContract
import com.jinduplan.planmanager.mvp.presenter.MessagePresenter
import com.jinduplan.planmanager.ui.activity.project.ProjectDetailActivity
import com.jinduplan.planmanager.utils.GlideUtil
import com.jinduplan.planmanager.utils.ResUtil
import com.jinduplan.planmanager.widgets.CircleImageView
import com.luck.indicator.EasyIndicator
import kotlinx.android.synthetic.main.activity_message.*
import kotlinx.android.synthetic.main.activity_message_detail.*
import kotlinx.android.synthetic.main.activity_project.*
import kotlinx.android.synthetic.main.activity_project.back
import kotlinx.android.synthetic.main.activity_project.recyclerView
import kotlinx.android.synthetic.main.activity_project.swipeRefreshLayout


class MessageDetailActivity : BaseMvpActivity<MessageContract.View, MessageContract.Presenter>(),
    MessageContract.View {


    override fun createPresenter(): MessageContract.Presenter = MessagePresenter()


    private var data: MessageBean.DataBean? = null


    override fun start() {


    }

    override fun initView() {
        super.initView()
        setStatusBarColor(ResUtil.getC(R.color.white))
        back.setOnClickListener { finish() }
        data = intent.getSerializableExtra("msg") as MessageBean.DataBean?
        tv_content.text=data!!.content
        bt_config.setOnClickListener {
            mPresenter?.readMessage(data!!.id,1)
        }
    }


    override fun attachLayoutRes(): Int {
        return R.layout.activity_message_detail
    }


    override fun setMsgListData(data: MessageBean) {

    }

    override fun readMsgSuccess() {
        finish()
    }

    override fun setProjectListData(projectData: DataProjectBean, msg: MessageBean.DataBean) {

    }


}